#include <iostream>
#include <vector>
#include <map>
using namespace std;

int main() {
	typedef pair<string, string> child;
	typedef vector<child> children;
	typedef string surname;
	
	map<surname, children> family;
	
	family["a"].push_back(make_pair(string("a1"), string("01/01")));
	family["b"].push_back(make_pair(string("b1"), string("02/02")));
	family["c"].push_back(make_pair(string("c1"), string("03/03")));
	family["d"].push_back(make_pair(string("d1"), string("04/04")));
	family["c"].push_back(make_pair(string("c2"), string("05/05")));
	family["a"].push_back(make_pair(string("a2"), string("06/06")));
	family["b"].push_back(make_pair(string("b2"), string("07/07")));
	family["c"].push_back(make_pair(string("c3"), string("08/08")));
	
	map<surname, children>::iterator mi;
	children::iterator vi;
	
	string s;
	
	for(mi = family.begin(); mi != family.end(); ++mi){
		s = mi->first;
		cout << s << endl;
		for(vi = mi->second.begin(); vi != mi->second.end(); ++vi)
			cout << s << "\t" << vi->first << "\t" << vi->second << endl;
	}
	
//	cout << "Please enter family name: ";
//	string name;
//	cin >> name;
//	while(!name.empty()){
//		cout << name << endl;
//		for(vi = family[name].begin();
//			vi != family[name].end(); ++vi){
//			cout << name << "\t" << *vi << endl;
//		}
//		cout << "Please enter family name: ";
//		cin >> name;
//	}
//	return 0;
}
